type label =
	Pre of int
	| Post of int
	;;

type labels = 
	Labels of label * label
	;;
  
type value =
  True
  | False
  ;;
	
type expression = 
  Value of value
	| Variable of string 
	| Not of expression 
	| Equal of expression * expression 
	| And of expression * expression 
	| Or of expression * expression
	| Group of expression
	;;
  
type decider =
  Expression of expression
  | Undet
  ;;
	
type statement = 
	Skip of labels
	| Ifelse of labels * decider * statement * statement 
	| Comp of labels * statement * statement 
	| Assignment of labels * string list * expression list
	| Callvoid of labels * string * expression list				(* for: p B *)
	| Callbool of labels * string * string * expression list	(* for: x := p B *)
	| While of labels * decider * statement
	| Returnvoid of labels
	| Returnbool of labels * expression
	;;
	
type decl =
	Declaration of labels * string
	| Empty
	| Declcomp of labels * decl * decl
	;;

type proctype =
	Void
	| Bool
	;;
	
type procedure =
	Procedure of labels * proctype * string * string list * decl * statement (* for void/bool p (X) BEGIN D S END *)
	;;
	
type bp =
	Bp of decl * procedure list
	;;
	
type location =
	Location of int
	;;

type code = 
	CodeDecl of decl
	| CodeStm of statement
	| Nothing
	;;